package com.chenyaowei.marketing.domain;

import com.chenyaowei.common.annotation.Excel;
import com.chenyaowei.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Transient;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

/**
 * 优惠券信息对象 cyw_coupon_info
 *
 * @author 陈耀威
 * @date 2023-11-28
 */
public class CywCouponInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 优惠卷类型[0-&gt;全场赠券；1-&gt;会员赠券；2-&gt;购物赠券；3-&gt;注册赠券; 4-&gt;积分兑换] */
    @Excel(name = "优惠卷类型[0-&gt;全场赠券；1-&gt;会员赠券；2-&gt;购物赠券；3-&gt;注册赠券; 4-&gt;积分兑换]")
    private Integer couponType;

    /** 优惠券图片 */
    @Excel(name = "优惠券图片")
    private String couponImg;

    /** 优惠卷名字 */
    @Excel(name = "优惠卷名字")
    private String couponName;

    /** 数量 */
    @Excel(name = "数量")
    private Integer num;

    /** 金额 */
    @Excel(name = "金额")
    private BigDecimal amount;

    /** 每人限领张数 */
    @Excel(name = "每人限领张数")
    private Integer perLimit;

    /** 使用门槛 */
    @Excel(name = "使用门槛")
    private BigDecimal minPoint;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 使用类型[0-&gt;全场通用；1-&gt;指定分类；2-&gt;指定商品] */
    @Excel(name = "使用类型[0-&gt;全场通用；1-&gt;指定分类；2-&gt;指定商品]")
    private Integer useType;

    /** 备注 */
    @Excel(name = "备注")
    private String note;

    /** 发行数量 */
    @Excel(name = "发行数量")
    private Integer publishCount;

    /** 已使用数量 */
    @Excel(name = "已使用数量")
    private Integer useCount;

    /** 领取数量 */
    @Excel(name = "领取数量")
    private Integer receiveCount;

    /** 可以领取的开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "可以领取的开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date enableStartTime;

    /** 可以领取的结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "可以领取的结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date enableEndTime;

    /** 优惠码 */
    @Excel(name = "优惠码")
    private String code;

    /** 可以领取的会员等级[0-&gt;不限等级，其他-对应等级] */
    @Excel(name = "可以领取的会员等级[0-&gt;不限等级，其他-对应等级]")
    private Integer memberLevel;

    /** 发布状态[0-未发布，1-已发布] */
    @Excel(name = "发布状态[0-未发布，1-已发布]")
    private Integer publish;

    /** 兑换所需积分 */
    @Excel(name = "兑换所需积分")
    private Integer requiredIntegral;

    @Transient
    private Boolean enable;

    @Transient
    private String msg;

    @Transient
    private String memberLevelName;

    @Transient
    private Boolean checked;

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        CywCouponInfo other = (CywCouponInfo) obj;
        return id.equals(other.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public String getMemberLevelName() {
        return memberLevelName;
    }

    public void setMemberLevelName(String memberLevelName) {
        this.memberLevelName = memberLevelName;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCouponType(Integer couponType)
    {
        this.couponType = couponType;
    }

    public Integer getCouponType()
    {
        return couponType;
    }
    public void setCouponImg(String couponImg)
    {
        this.couponImg = couponImg;
    }

    public String getCouponImg()
    {
        return couponImg;
    }
    public void setCouponName(String couponName)
    {
        this.couponName = couponName;
    }

    public String getCouponName()
    {
        return couponName;
    }
    public void setNum(Integer num)
    {
        this.num = num;
    }

    public Integer getNum()
    {
        return num;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setPerLimit(Integer perLimit)
    {
        this.perLimit = perLimit;
    }

    public Integer getPerLimit()
    {
        return perLimit;
    }
    public void setMinPoint(BigDecimal minPoint)
    {
        this.minPoint = minPoint;
    }

    public BigDecimal getMinPoint()
    {
        return minPoint;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setUseType(Integer useType)
    {
        this.useType = useType;
    }

    public Integer getUseType()
    {
        return useType;
    }
    public void setNote(String note)
    {
        this.note = note;
    }

    public String getNote()
    {
        return note;
    }
    public void setPublishCount(Integer publishCount)
    {
        this.publishCount = publishCount;
    }

    public Integer getPublishCount()
    {
        return publishCount;
    }
    public void setUseCount(Integer useCount)
    {
        this.useCount = useCount;
    }

    public Integer getUseCount()
    {
        return useCount;
    }
    public void setReceiveCount(Integer receiveCount)
    {
        this.receiveCount = receiveCount;
    }

    public Integer getReceiveCount()
    {
        return receiveCount;
    }
    public void setEnableStartTime(Date enableStartTime)
    {
        this.enableStartTime = enableStartTime;
    }

    public Date getEnableStartTime()
    {
        return enableStartTime;
    }
    public void setEnableEndTime(Date enableEndTime)
    {
        this.enableEndTime = enableEndTime;
    }

    public Date getEnableEndTime()
    {
        return enableEndTime;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setMemberLevel(Integer memberLevel)
    {
        this.memberLevel = memberLevel;
    }

    public Integer getMemberLevel()
    {
        return memberLevel;
    }
    public void setPublish(Integer publish)
    {
        this.publish = publish;
    }

    public Integer getPublish()
    {
        return publish;
    }
    public void setRequiredIntegral(Integer requiredIntegral)
    {
        this.requiredIntegral = requiredIntegral;
    }

    public Integer getRequiredIntegral()
    {
        return requiredIntegral;
    }

    @Override
    public String toString() {
        return "CywCouponInfo{" +
                "id=" + id +
                ", couponType=" + couponType +
                ", couponImg='" + couponImg + '\'' +
                ", couponName='" + couponName + '\'' +
                ", num=" + num +
                ", amount=" + amount +
                ", perLimit=" + perLimit +
                ", minPoint=" + minPoint +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", useType=" + useType +
                ", note='" + note + '\'' +
                ", publishCount=" + publishCount +
                ", useCount=" + useCount +
                ", receiveCount=" + receiveCount +
                ", enableStartTime=" + enableStartTime +
                ", enableEndTime=" + enableEndTime +
                ", code='" + code + '\'' +
                ", memberLevel=" + memberLevel +
                ", publish=" + publish +
                ", requiredIntegral=" + requiredIntegral +
                ", enable=" + enable +
                ", msg='" + msg + '\'' +
                ", memberLevelName='" + memberLevelName + '\'' +
                ", checked=" + checked +
                '}';
    }
}
